<!doctype html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <title>那个夏天</title>
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
    <meta name="screen-orientation" content="landscape">
    <meta name="viewport" content="width=device-width, initial-scale=1, minimal-ui">
    <link rel="stylesheet" href="//cdn.bootcss.com/animate.css/3.5.2/animate.min.css" />
    <link rel="stylesheet" href="style.css" />
    <link rel="stylesheet" href="stage.css" />
    <script src="//cdn.bootcss.com/vue/1.0.26/vue.min.js"></script>
  </head>
  <body>
    <div class="note">横屏浏览效果更佳 :) </div>
    <div class="github"><a href="https://github.com/yfwz100/act-playground">yfwz100</a></div>
    <div id="story-frame">
      <div class="frame animated" v-for="script in scripts" v-if="$index == idx"
           transition="fade"
           v-bind:class="{menu: script.type=='menu', dialog: script.type=='dialog'}">
        <img class="background" v-if="script.background" v-bind:src="script.background" />
        
        <div class="menu-wrap" v-if="script.type == 'menu'">
          <div class="title">{{ script.title }}</div>
          <ul class="menu">
            <li v-for="it in script.menu" v-on:click="menu(it.action)">
              {{{ it.text }}}
            </li>
          </ul>
        </div>
        
        <div class="dialog-wrap" v-if="script.type == 'dialog'" v-on:click="nextSubDialog">
          <div class="text">
            <p class="animated" v-for="it in script.content" v-if="$index == subIdx" transition="fade">
              {{ it }}
            </p>
          </div>
        </div>

        <div class="story-wrap" v-if="script.type == 'story'" v-on:click="next">
          <div class="text">
            <p v-for="it in script.content">
              {{ it }}
            </p>
          </div>
        </div>
        
        <div class="cover-wrap" v-if="script.type == 'cover'" v-on:click="menu(script.action)">
          <div class="title">{{ script.title }}</div>
          <div class="description">
            {{ script.description }}
          </div>
        </div>
      </div>
    </div><!-- /story-frame -->
    <script src="game.js"></script>
  </body>
</html>